package com.sparrow.source.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sparrow.source.common.dto.DesktopReport;
import com.sparrow.source.common.dto.ReportDeviceChannel;
import com.sparrow.source.common.dto.ReportTable;
import com.sparrow.source.common.dto.ReportTableRequest;
import com.sparrow.source.persistense.IasVerifyReport;

import java.util.List;
import java.util.Map;

/**
 * @author bryceyung
 * @since 2024/11/25
 */
public interface IIasVerifyReportService extends IService<IasVerifyReport> {

    Boolean saveReport(IasVerifyReport report);

    /**
     * 校验用户当日是否打卡
     *
     * @param channelFlag
     * @param uid
     * @return
     */
    Boolean haveCheckedInCurdate(String deviceCode,Integer channelFlag, Long uid);

    /**
     * 查询分页列表
     * @param reportTableRequest
     * @param page
     * @return
     */
    IPage<ReportTable> queryReportTable(ReportTableRequest reportTableRequest, Page<ReportTable> page);

    Map<String, List<ReportDeviceChannel>> queryDeviceChannel();

    List<ReportDeviceChannel> queryCheckCountWeekly();

    /**
     * 更新设备在离线状态
     *
     * @param deviceCode
     * @return
     */
    Boolean updateOnlineStatus(String deviceCode,Boolean staus);

    DesktopReport getDesktopReport();

    List<ReportDeviceChannel> queryCurrDate(String beginDate,String endDate,Integer deviceId);

}
